<?php

namespace App\Services;
use App\Services\BaseServices;
use App\Models\User;

class UserServices extends BaseServices{

    /**
     * 根据open_id获取用户是否存在
     * @param $openId
     * @return User|null|Model
     */

    public function getByOpenId( $openId )
    {
        return User::query()->where('open_id', $openId )
            ->first();
    }
}